package com.gunncs.actoriface;
import com.gunncs.actoriface.*;
public class IdentifySidesActor implements Actor {
	/*
	int step = 0;
	int nsteps = 2;
	boolean trouble=false;
	*/
	double right45, left45, right135, left135; //0 ~ 100
	
        public String getMaze() {
          return "Super";
        }
	
	public void act(Robot r) {
		/*
		if(trouble){
			r.goBackward();
			r.waitDistance(10 +(int)(Math.random() * 10));

			if(Math.random() > .5)
			  r.turnLeft();
			else
			  r.turnRight();
			r.waitAngle(90);
			
			//Turns right 90 degrees
		} else {
			r.goForward();
			r.waitDistance(1);
		}
		*/

	}

	public void updateSensors(Sensor[] sensors) {
		//the hard wired 
		right45 = sensors[1].getState()[0];
		left45 = sensors[2].getState()[0];
		left135 = sensors[3].getState()[0];
		right135 = sensors[4].getState()[0];
		/*
		if(sensors[0].read()[0] == TouchSensor.PRESSED
		){
			trouble = true;
			Simulator.out.println("hit!");
		} else {
		  trouble = false;
		}
		*/
	}
}